package view.popup
{
	import flash.events.MouseEvent;
	
	import xm.components.ScrollableContainer;
	import xm.core.XMSprite;
	
	
	/**
	 * <br> 클래스 설명 : </br>
	 * @author 김정환
	 */	
	public class Popup11 extends ScrollableContainer
	{
		//-----------------------------------------------------------------------------------
		// public vars
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// protected / internal vars
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// private vars
		//-----------------------------------------------------------------------------------
		private var sp : XMSprite;
		//-----------------------------------------------------------------------------------
		// public functions
		//-----------------------------------------------------------------------------------
		
		/**
		 * constructor 
		 */	
		public function Popup11()
		{
			super();
		}
		
		/**
		 * commitProperties
		 */		
		override public function commitProperties():void
		{
			super.commitProperties();
		}
		
		/**
		 * updateDisplayList
		 */		
		override public function updateDisplayList( enforce : Boolean = false ):void
		{
			super.updateDisplayList(enforce);
			sp.y = this.scrolledPosY;
		}
		
		//-----------------------------------------------------------------------------------
		// life cycle functions
		//-----------------------------------------------------------------------------------
		
		/**
		 * createChildren
		 */		
		override public function createChildren():void
		{
			super.createChildren();
			
			viewWidth = 200;
			viewHeight = 300;
			backgroundColor = 0xffffff;
			backgroundAlpha = 1;
			borderAlpha = [1,1,1,1];
			borderColor = [0x000000,0x000000,0x000000,0x000000];
			borderThickness = [1,1,1,1];
			
			sp = new XMSprite();
			sp.viewWidth = 150;
			sp.viewHeight = 1000;
			sp.y = 20;
			sp.x = 25;
			
			sp.backgroundColor = 0xcccccc;
			sp.backgroundAlpha = 1;
			sp.borderAlpha = [1,1,1,1];
			sp.borderColor = [0x0000ff,0x0000ff,0x0000ff,0x0000ff];
			sp.borderThickness = [2,2,2,2];
			
			sp.invalidateDisplayList();
			
			this.addChild( sp );
			
			
			
			
		}
		
		/**
		 * createComplete
		 */		
		override public function creationComplete():void
		{
			super.creationComplete();
		}
		
		/**
		 * add
		 */		
		override public function add():void
		{
			super.add();
		}
		
		/**
		 * startAddTransition : add 완료 후 transition 이 있으면 화면전환효과를 실행한다.
		 */		
		override public function startAddTransition():void
		{
			super.startAddTransition();
		}
		
		/**
		 * startAddTransition 완료.
		 */		
		override public function endAddTransition():void
		{
			super.endAddTransition();
		}
		
		/**
		 * startRemoveTransition : remove 하기 전 transition 이 있으면 화면전환효과를 실행한다.
		 */		
		override public function startRemoveTransition():void
		{
			super.startRemoveTransition();
		}
		
		/**
		 * startRemoveTransition 완료.
		 */		
		override public function endRemoveTransition():void
		{
			super.endRemoveTransition();
		}
		
		/**
		 * remove
		 */		
		override public function remove():void
		{
			super.remove();
		}
		
		/**
		 * destroy
		 */		
		override public function destroy():void
		{
			super.destroy();
		}
		
		//-----------------------------------------------------------------------------------
		// setter / getter
		//-----------------------------------------------------------------------------------
		/**
		 * list 에서는 this의 높이를 가상으로 셋팅해야 한다.
		 * @return this의 높이 
		 */		
		override public function get height():Number
		{
			return sp.height;
		}
		//-----------------------------------------------------------------------------------
		// protected functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// internal functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// private functions
		//-----------------------------------------------------------------------------------
		//-----------------------------------------------------------------------------------
		// event handler
		//-----------------------------------------------------------------------------------
		
		
	}
}